package com.lrs.java.j2se_self.lastJava;
import java.io.*;
public class TestPrintStream {
	public static void main(String[] args){
		String s = null;
		if((s=args[0]) != null){
			list(s,System.out);
		}
	}
	public static void list(String s,PrintStream ps){
		try{
			FileReader f = new FileReader(s);
			BufferedReader br = new BufferedReader(f);
			String ss = null;
			while((ss=br.readLine())!=null){
				ps.println(ss);
			}
			f.close();
		}catch(IOException e){
			System.out.println("文件无法读入");
		}
	}
}
